let result = ["672180120971705d1502e3f3", "672180180971705d1502e3f4"];
let cartList = [{
        "productId": "105987280",
        "buyNum": 6,
        "masterName": "【山东】金秋红蜜桃",
        "slaveName": "基地果园现摘现发 鲜甜红润肉厚 富含维生素",
        "userId": "67217f9f0971705d1502e3f2",
        "imgUrl": "https://mall.s.maizuo.com/86d8414272e50b4b9a7b185ac30dfc86.png",
        "price": "5780",
        "cartId": "672180120971705d1502e3f3"
    },
    {
        "productId": "104553417",
        "buyNum": 10,
        "masterName": "【云南】实建褚橙 10斤装 （95-135g/枚）",
        "slaveName": "源自“花腰傣之乡” 鲜甜脆嫩多汁 富含维C营养",
        "userId": "67217f9f0971705d1502e3f2",
        "imgUrl": "https://mall.s.maizuo.com/c8ae4728163788cda4147e1ed8c44409.png",
        "price": "9800",
        "cartId": "672180180971705d1502e3f4"
    },
    {
        "productId": "105987280",
        "buyNum": 4,
        "masterName": "【山东】金秋红蜜桃",
        "slaveName": "基地果园现摘现发 鲜甜红润肉厚 富含维生素",
        "userId": "6720569c0971705d1502e36c",
        "imgUrl": "https://mall.s.maizuo.com/86d8414272e50b4b9a7b185ac30dfc86.png",
        "price": "5780",
        "cartId": "6721835c0971705d1502e3f9"
    }
]

// 方法一
let list = [];
result.forEach(cartId => {
    // 根据cartId找到对应的对象, 672180120971705d1502e3f3
    var obj = cartList.find(item => item.cartId === cartId);
    list.push(obj);
})
// console.log(list);



// 方法二
let newList = cartList.filter(item => result.includes(item.cartId));
console.log(newList);